﻿@model MobileWebsiteGenerator.Entities.pictureGallery
@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Shared/_Layout_Login.cshtml";
}
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<link href="@Url.Content("~/Content/Css/uploadify.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery.uploadify.js")" type="text/javascript"></script>
<script type="text/javascript">
    $(window).load(
    function () {
        $("#ImageUploader").fileUpload({
            'uploader': '/Scripts/uploader.swf',
            'cancelImg': '/Images/cancel.png',
            'buttonText': 'Select Image',
            'script': 'Upload',
            'folder': '@Url.Content("~/Uploads")',
            'fileDesc': 'Image Files',
            'fileExt': '*.jpg;*.jpeg;*.gif;*.png',
            'multi': true,
            'auto': true,
            'onComplete': function (event, ID, fileObj, response, data) {
                $("#ImagePath").attr("value", response);
            }
        });
    }
);
</script>
<style type="text/css">
    #create:hover
    {
        background-color: #11639d;
        color: White;
    }
    
    #form1 .form_row label
    {
        background-color: #11639d;
        color: White;
    }
</style>
<div style="float: right; width: 680px; vertical-align: top; margin: 0px; padding: 0px;">
    <a href="@Url.Action("Create", "Website", MobileWebsiteGenerator.MvcApplication._MainCustomer)" style="color:Black;" id="GoToMain" title="Go to Main page">
        <img src="@Url.Content("~/images/Arrow -Left.png")" alt="Alternate Text" /></a>
    <h3>
        Add new images for your gallery</h3>
    <form id="form1" method="post" action="/PictureGallery/Create">
    <div class="form_row">
        <label>
            ImagePath</label>
        <input class="text-box single-line form_input" id="ImagePath" name="ImagePath" type="text" value="@Model.ImagePath" />

           <div id="ImageUploader">
    </div>
    </div>


    <div class="form_row">
        <label>
            Add caption</label>
        <input class="text-box single-line form_input" id="Caption" name="Caption" type="text" value="@Model.Caption" />
    </div>
    <div class="form_row">
    </div>
 
    <div style="margin-top: 25PX;" class="form_row">
        <input type="submit" class="form_submit" id="submit" value="Submit" />
    </div>
    </form>
</div>
@section MobilePreview
{
    @Html.Partial("_PreviewOnMobile", MobileWebsiteGenerator.MvcApplication._MainCustomer);
}
